1. Field of the Invention
The present invention relates to a data packet recording apparatus and a data packet reproducing apparatus suited for recording and reproducing data compressed according to an MPEG standard.
2. Background Information
Digital processing of images has made great progress in recent years as a result of the establishment of image compression techniques such as the MPEG2 (Moving Picture Experts Group 2) standard. Television broadcasting companies have also begun to examine adopting a digital broadcasting system using the MPEG2 standard. In addition, a multiple media service which is capable of providing various information services in response to user demands by handling audio and video data integrally is also being developed at this time. In the MPEG2 standard, video signals are coded using the DCT (Discrete Cosine Transform), inter-frame predictive coding, run-length coding and entropy coding. That is, in the MPEG system, compression (the intra-frame compression) by the DCT in one frame is carried out and inter-frame compression is adopted to reduce redundancy in the time base direction using inter-frame correlation.
The MPEG2 has a system provided for multi-channel broadcasting and multiple communications or storage media. That is, to facilitate time-division multiplexing of plural video and audio data, data are transmitted in packets in the MPEG2 system. Each packet contains the same type of data and an identification signal (PID) identifying the type of data in the packet. Thus, it becomes possible to simultaneously transmit both video and audio data as well as prescribed private data such that the present system is usable in the fields of broadcasting communication and storage media.
FIG. 1 is a diagram showing the construction of a transport data packet which is a unit of data transmission in the MPEG2 standard.
The transport data packets correspond to multi-programs (channels), and a desired program packet is selectable from plural programs which are transmitted according to time-division system during decoding. For purposes of selection, a transport data packet is transmitted with a link level header affixed to a payload to transmit information, as shown in FIG. 2. Out of 188 bytes of the transport data packet, four bytes represent the link level header. Further, the PES (Packetized Elementary Stream Packet) contains several transport data packets.
The link level header is comprised of a sync byte arranged at the top, followed by a transport data packet error indicator showing the presence of bit error, a PES packet start indicator showing the start of the PES packet, a transport data packet priority showing the priority of the transport data packet, a PID (Packet Identification) containing packet identification information, a transport data scrambling control showing the presence of scrambled data, an adaptation field control showing the presence of a payload, etc. and a continuity counter showing the continuity of the same PID arranged in order. Further, a sync byte having eight bits at the top of the packet contains a specific code and is always hexadecimal figure "47".
An MPEG2 decoder extracts packets having the same PID by referring to PIDs of packets which are input successively. Thus, it is possible to decode a desired program from only the transmitted data. For instance, when a transport data stream having video, audio and other data is input, it becomes possible to decode a display video data using only a television set conforming to the MPEG2 standard.
Further, a PID for each packet can be set up as desired at the sending side, but it is necessary to clarify the correspondence of the PID with other information, such as the type of data being identified by the PID. Therefore, in the transport data stream, an identification table describing a PID list, etc. is transmitted in the form of a Program Map Table (PMT) packet. A Program Association Table (PAT) packet identifying the PID of the PMT packet is also transmitted. The PID of the PAT packet is assigned to the 0th position of the transport data stream, as shown in FIG. 2. Further, the PAT and PMT packets are transmitted at prescribed intervals. The transmitted identification table is effective until it is updated by the next identification table packet. The MPEG2 decoder recognizes the relationships between the PID and the type of data being identified by referring to the identification table of the PMT packet.
FIG. 2 is a diagram showing a transport data stream for transmitting plural types of data through the transport data packets (the unit of data transmission in the MPEG2 standard).
In FIG. 2, a transport data stream 1 is comprised of packets based on video data, audio data and other data. Each number in each packet in FIG. 2 indicates a PID, and the PIDs of the PAT and PMT packets are assigned to the 0th and 13th positions, respectively. The transport data stream 1 is transmitted with the PAT packet 2. The 0th PID is arranged at the top of the transport data stream, followed by the PMT packet 3. The PAT packet 2 indicates that the PID of the PMT packet 3 is 13, and the identification table of the PMT packet 3 shows that the PIDs of the video data, the audio data and other data are assigned to the 19th, 20th and 21st positions, respectively. That is, the transport data stream 1 is transmitted with the packets arranged in an order having the PAT and PMT packets 2 and 3 followed by a video packet, an audio packet, two video packets, an other packet, a video packet, and so on as indicated by the PIDs in FIG. 2.
Further, a PAT packet 4, which is transmitted second, indicates that a PID of the PMT packet 5 is assigned to the 13th position and the identification table of the PMT packet 5 indicates that the PIDs of the video packet, the audio packet and other packets are assigned at the 39th, 40th and 41st positions, respectively. Therefore, FIG. 2 shows that the transport data stream 1 is transmitted with the packets arranged in an order having a video packet, another video packet, an audio packet, a video packet, an other packet, a video packet, and so on after the PMT packet 5.
The recording of the transport data stream with a VCR (Video Cassette Recorder) will now be considered. A helical scanning type VCR reads information recorded on a magnetic tape by tracing the recorded tracks formed on the magnetic tape with a rotary head. A normal speed playback is carried out by matching the recorded track pattern with the head trace pattern used at the time of reproduction. This is done by bringing the rotation speed of the rotary head in accordance with the running speed of a magnetic tape at the time of the recording and reproducing.
On the other hand, during trick play operation, the tape running speed is changed according to a desired playback speed. In this case, the head traces the recording tracks by crossing the track pattern instead of matching it, and only data recorded on the portions where the head and the recording track azimuth agree with each other are read. In this case, it is also possible to reproduce one frame in an analog recording where the position on the frame corresponds to the recorded position on a recording medium.
However, when image data compressed according to the MPEG system are recorded on a recording medium, code volumes differ between intra-frame compression frames and inter-frame compression frames, and it is not always possible to reproduce only one frame from the data being reproduced at a fast speed since the vertical position of image data on the frame does not correspond to the vertical recorded position on a recording medium. Furthermore, since it is not possible to decode an independent frame from inter-frame compression frames, playback operation may become impossible if undecoded frames are generated in the fast playback.
Japanese Patent Application TOKUGAN-HEI 06-065298, previously filed by the applicant of the present invention, proposes a method for recording data for fast intermittent playback on the track positions which the head passes during fast playback. At the time of reproduction, images reproduced at a fast speed are obtained by accurately tracing the areas where fast speed playback data are recorded.
FIG. 3 is a diagram illustrating the head trace in the above application. Further, to simplify the explanation, the specification will be described without considering the azimuths of the heads and the recording tracks.
On a magnetic tape 6, recording tracks 7 have been formed. The magnetic tape 6 travels toward the left side during normal playback in FIG. 3. At the time of fast playback, traces 8 of the head extend over plural recording tracks 7. The traces 8, as shown in FIG. 3, are shown at the time of reverse fast playback and are inclined based on the playback speed. When the tracking phase is controlled, trick play data recording areas (the shaded portions in FIG. 3) T (T1, T2, etc.) occur. By tracing the trick play data recording areas T with the head during fast playback operation, the trick play data recorded in the shaded areas can be reproduced.
In the system described above, input coded data are recorded in areas other than the trick play data recording areas T, and trick play data are generated from coded data, packetized into trick play data packets and recorded in the trick play data recording areas T.
FIG. 4 is an explanatory diagram showing a data stream which is recorded in the trick play data recording areas 8. FIG. 4(a) shows an input data stream and FIG. 4(b) shows a trick play data stream. Numerical figures in FIG. 4 indicate PIDs.
The input data stream is assumed to be the same data stream as in FIG. 1. PIDs 19 and 39 shown in FIG. 4(a) indicate video data packets. PIDs 20 and 40 indicate audio data packets and PIDs 21 and 41 indicate other data packets.
Special reproducing data is produced from the video data packets shown by PIDs 19 and 39. For instance, trick play data is produced only from intra-frame compression video data. Further, it is also necessary to record an identification table packet to make decoding of recorded trick play data possible by reproducing and supplying the data to the MPEG2 decoder. For this reason, a 0th PID identification table packet is also recorded as trick play data as shown in FIG. 4(b).
By the way, because the recording rate of trick play data is different than that of normal reproducing data, trick play data and normal reproducing data recorded on the same tracks are separated in time from each other. FIG. 5 is an explanatory diagram showing the correspondence between the recording data and the frames. FIG. 5(a) shows the recording tracks, FIG. 5(b) shows the recorded data in the trick play data recording areas and FIG. 5(c) shows the picture frame display timing during reproduction.
On a magnetic tape 5, trick play data recording areas are provided for recording trick play data of a prescribed speed. Numerical figures shown at the lower end of FIG. 5(a) show record track numbers. In these trick play data recording area, frame data having timings which are different from normal reproducing data are recorded. For instance, as shown in FIG. 5(b), part of the video data from the 0th frame and the first frame are recorded in the trick play data recording area T11 of the 2nd track after the 0th PID data packet. Similarly, part of the video data from the first frame and the second frame are recorded in the trick play data recording area T12 of the 6th track, and part of the video data from the second and the third frames are recorded in the trick play data recording area T13 of the 10th track. Further, in the trick play data recording area T14 of the 14th track, data packets at the 0th PID are recorded following a part of the video data from the third frame, and part of the video data from the fourth frame is recorded after the 0th PID.
By the way, the identification table packets 2 and 3 shown by the shaded portions in FIG. 5(b) may transmit different identification tables. Therefore, it is necessary for the MPEG2 decoder to decode identification tables when decoding video data as described above. Now, it is assumed that the playback mode is changed from normal speed to the trick play mode. In this case, if reproduced data are obtained by the trace 15, the identification table packet 2 in the trick play data recording area T11 is reproduced and therefore, data subsequent to the 0th frame can be decoded. In this case, as shown in FIG. 5(c), the 0th frame image obtained by the decoding process of the 0th frame video data is retained and a displayed until the decoding process of the next first frame video data is completed. Similarly, the image of each frame is stored and displayed until the decoding process of the next frame is completed. Further, the scale of the x axis in FIG. 5(c) shows a display time of one frame.
However, the trick play data recording area T11 is not always reproduced when the reproduction made changes from normal speed to trick play mode. For instance, it is assumed that reproduced data is first obtained by the trace 16 immediately after shifting to the trick play mode. In this case, video data from the first and the second frames are partially reproduced from the trick play data recording area T12. However, the identification table packet 2, which is for discriminating type of these frame data, has not been reproduced in this case. Thus, without the identification table packet 2, it is not possible for the MPEG2 decoder to decode the reproduced data of the trick play data recording area T12. Similarly, the parts of the video data from the second and the third frames obtained by the next trace 17 cannot be decoded either. That is, in this case, only the data reproduced after the decoding of the identification table packet 3 contained in the trick play data recording area T14 can be used for the video display. As shown, FIG. 5(c), in the trick play mode, the signal rate is very low and the same image is retained and displayed during the period of several frames. Therefore, it will become impossible to display an image for a relatively long time immediately after the normal speed playback mode is changed to the trick play mode.
FIG. 6 is an explanatory diagram showing the reproduced data obtained by a series of traces in the trick play mode as shown in FIG. 5(a). NP shown in FIG. 6 indicates the reproduced normal reproducing data and TP indicates the reproduced trick play data.
In the first half of each trace, the reproduced data NP is obtained from the normal reproducing data recording area and the trick play data TP is obtained when the trick play data recording area is traced. The reproduced data train shown in FIG. 6 is thus obtained. The PIDs are not discriminated for the trick play packet and the normal reproduced packet during the recording. Therefore, to extract the trick play data TP from only the reproduced data train shown in FIG. 6 in the trick play mode, it is necessary to record information for discriminating whether given packets are normal reproduced packets or trick play packets.
As described above, there was a problem that trick play images could not be restored immediately after the playback mode was shifted from normal speed to the trick play mode for reproducing trick play data recorded in the trick play data recording areas. Furthermore, there was also a problem with storing information for discriminating whether packets are normal reproducing packets or trick play packets.
FIG. 7 is a diagram showing a data stream which is recorded in the trick play data recording areas T. Numerical figures in FIG. 7 show the trick play data packet numbers, and the recording is made in the order of these numbers.
Since trick play data is a variable length code, the number of packets differ in each trick play frame. FIG. 7 shows an example of trick play data comprising a first trick play frame having 11 packets from the 1st through the 11th packets and a second trick play frame having seven packets from the 12th through 18th packets. By the way, in case of a SD format for a consumer-use digital VTR, every sync block is recorded on tracks as a unit of data recording, which is 90 bytes long. Further, since the packet length of the transport data packet of the MPEG2 is 188 bytes long as shown in FIG. 1, the data is recorded with two packets assigned to five sync blocks.
Now, it is assumed that it is possible to record data by assigning ten sync blocks to one trick play data recording area T. That is, four data packets can be recorded in one trick play data recording area T. When recording, for instance, the 1st through the 4th packets in the trick play data recording area T1 shown in FIG. 3, the 5th through 8th packets, the 9th through the 12th packets, the 13th through the 16th packets and the 17th through the 20th packets can be recorded in the trick play data recording areas T2 through T5, respectively.
In the forward playback operation, the magnetic tape 6 travels toward the left side, the same direction as during the recording, and the head reads the data sequentially toward the right side tracks from the left side tracks as shown in FIG. 3. That is, at the time of fast forward playback operation, the reproduction is made from the trick play data recording area T1 at the left side toward the trick play data recording area T5 at the right side in FIG. 3. If data in the trick play data recording areas T1, T2 and so on can be reproduced during the fast forward playback, data can be reproduced in the order of the 1st, the 2nd, the 3rd, etc. packets, and the 1st and the 2nd trick play frames can be sequentially restored.
However, in the fast reverse playback operation, the magnetic tape 6 travels in the direction shown by the top arrow in FIG. 3, and the reproduction is carried out in the order of the trick play data recording areas T5, T4, T3, etc. That is, the 17th, 18th, 19th and 20th packets are first reproduced from the trick play data recording area T5 and then the 13th, 14th, 15th and 16th packets are reproduced from the trick play data recording area T4. Similarly, data is reproduced from the trick play data recording areas T3, T2 and T1 and consequently the data packets are reproduced in the order of the 9th, 10th, 11th and 12th packets, the 5th, 6th, 7th and 8th packets, and the 1st, 2nd, 3rd and 4th packets.
To restore the trick play frames, it is necessary to arrange each data packet in a frame by frame manner in the original recording order. FIG. 8 is a diagram showing the packet arrangement required for the reverse playback. As shown in FIG. 8, for the reverse playback, reversal of the time sequence of a series of frames is required. Also, the data packets of frames need to be arranged in a coding sequence corresponding to the frame positions. That is, the data packets must be arranged in numerical order for the 12th through the 18th packets and the 1st through the 11th packets.
To rearrange reproduced data as described above, information for identifying a packet at the boundary between the trick play frames is required. Thus, there has been a problem that a flag identifying the boundary between frames must be recorded in packets or sync blocks to make reverse playback possible.
As described above, there was a problem in that recording information indicating a packet at the boundary between frames in packets or sync blocks was required to rearrange the reproduced data packet for restoring trick play frames.